Skip to content

Allow removing Cursor, Muse, and Copilot when their CLI is missing - #20788

Open
vincentritter wants to merge 3 commits into
omacom:quattrofrom
vincentritter:fix/agent-account-remove-missing-cli
Open

vincentritter wants to merge 3 commits into
omacom:quattrofrom
vincentritter:fix/agent-account-remove-missing-cli

Conversation

@vincentritter

@vincentritter vincentritter commented Nov 29, 2026 •

Copy link
Copy Markdown

What changes

Removing Cursor, Muse, or Copilot from the agents panel (or via omarchy agent account remove) fails when the corresponding CLI (cursor-agent, muse, or copilot) is not installed. For example, uninstalling Cursor via the app picker leaves ~/.cursor on disk so the usage collector still treats Cursor as in use, and pressing Delete in the panel runs omarchy-agent-account-remove --yes --agent cursor, which exits with cursor-agent: command not found before reaching omarchy.agents showAgent cursor false. The same happens for Muse (e.g. uninstalled or used via pi/omp/opencode) and Copilot (when copilot is uninstalled).

  • cursor and muse: run cursor-agent logout / muse logout only when the CLI is present (omarchy-cmd-present); otherwise remove the saved CLI auth file (CURSOR_AUTH_PATH / MUSE_AUTH_PATH, defaulting to ${XDG_CONFIG_HOME:-$HOME/.config}/<agent>/auth.json, expanding leading ~/) and fall through to hide the agent in the panel.
  • copilot: only require a terminal and run copilot -i /logout when copilot is present; otherwise skip straight to hiding the agent.

opencode_logout is left untouched to avoid colliding with #20281.

Verification

  • bash test/shell.d/agent-account-test.sh: all 49 checks pass, including the new regression test covering cursor, muse, and copilot removal with a restricted PATH excluding any host CLIs (verifying auth file deletion, showAgent <agent> false, and that copilot still requires a terminal when installed).
  • ./test/cli: all 143 checks pass.
  • bash -n bin/omarchy-agent-account-remove test/shell.d/agent-account-test.sh: passes.
  • Did not click through the live agents panel UI for Copilot removal without copilot installed; Panel.qml still opens a floating terminal for Copilot, which now succeeds and hides it rather than failing with copilot: command not found.

Filed by Gemini 4 Neon via Antigravity.

@greptile-apps

greptile-apps Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5RetriggerView in Greptile

[Medium impact] The PR appears safe to merge.

Summary

Allows removing Cursor, Muse, and Copilot when their CLI is missing.

  • Cursor and Muse removal clears saved sign-ins without their CLIs.
  • Copilot can be hidden even when its CLI is missing.

Reviews (4) · Last reviewed commit: "Describe Copilot's hide-only removal whe..." · Reviewed by Greptile

Comment thread bin/omarchy-agent-account-remove Resolved
@omarchybot omarchybot added the bug Something isn't working label Nov 29, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Codex High, Opus 5.5 High, and Muse Wonder High via pi traced the Agents panel’s Delete action through the account removal command. The fallback reaches the hide step with all three CLIs absent. With Copilot absent it prints “Forgot Copilot” even though it only hides the row, and the Agents panel README still describes the CLI logouts. For the Cursor keyring case reported in #19559, the fallback deletes the auth file and leaves the Secret Service entry if one exists.

The worker preflight blocked the runtime checks. The GitHub Actions workflows are awaiting maintainer approval. Tests

The CLI fallback hides the Agents panel row and leaves the sign-in in place. Ask to hide Copilot when confirming that fallback and report the same outcome after it succeeds. Document what the three missing-CLI fallbacks do.

Co-Authored-By: Codex High <noreply@openai.com>
Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Dec 6, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Recommend: Hold — GitHub Actions has yet to run on , and the readiness check left the credential-cleanup scope for the maintainer.

Codex High and Opus 5.5 High checked all three removal paths. On an ISO worker, they failed on and after restoring the base command, then passed with the fix. The CLI, agent-account, and Agents panel suites passed. Cursor and Muse remove the auth files their collectors read. Commit makes the Copilot CLI prompt and output say that its fallback hides the row and leaves the sign-in in place.

Before confirming removal leaves Cursor in the Agents panel
After confirming removal hides the Cursor row

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants